//
//  AudioPlayer.m
//  OneToOne
//
//  Created by ByteDance on 2023/6/30.
//

#import "AudioPlayer.h"
#import "AudioSession.h"
#import <libavformat/avformat.h>
#import <AVFoundation/AVFoundation.h>


@implementation AudioPlayer{
    AVAudioSession *audiosession;
}

- (instancetype)init {
    self = [super init];
    if (self) {
        audiosession = [AVAudioSession sharedInstance];
        NSError *error;
        [audiosession setCategory:AVAudioSessionCategoryPlayback error:&error];
        NSTimeInterval bufferDuration = 0.002;
        [audiosession setPreferredIOBufferDuration:bufferDuration error:&error];
    }
    return self;
}

@end
